import request from "../../http";

const invoiceApi = {
  async postInvoiceData(params) {
    return request({
      url: "/pc/invoice",
      method: "post",
      data: params
    });
  },
  async editInvoiceData(params) {
    return request({
      url: "/pc/invoice",
      method: "put",
      data: params
    });
  },
  async getInvoiceList(query) {
    return request({
      url: "/pc/invoice/list",
      method: "get",
      params: query
    });
  },
  async getInvoiceDetail(id) {
    return request({
      url: `/pc/invoice/${id}`,
      method: "get"
    });
  },
  async deleteInvoice(params) {
    return request({
      url: "/pc/invoice",
      method: "delete",
      data:params
    });
  }
};

export default invoiceApi;
